<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
    <script src="./layui/layui.js"></script>
</head>
<body>
    <div>
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">考勤员工</label>
                <div class="layui-input-inline">
                    <select name="empId" lay-verify="required" lay-search>
                        <option value="">张三</option>
                        <option value="">李四</option>
                        <option value="">王五</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">考勤状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="正常" title="正常" checked>
                    <input type="radio" name="status" value="迟到" title="迟到">
                    <input type="radio" name="status" value="早退" title="早退">
                    <input type="radio" name="status" value="旷工" title="旷工">
                    <input type="radio" name="status" value="病假" title="病假">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline">
                    <input type="text" name="manager" required  lay-verify="required" placeholder="请输入备注" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="add" style="width: 180px;">添&nbsp;&nbsp;&nbsp;&nbsp;加</button>
                </div>
            </div>
        </form>
    </div>

    <script>
        layui.use(['layer','form'],function () {
            var layer = layui.layer
            var $ = layui.jquery
            var form = layui.form

            form.on('submit(add)',function(data){
                
                return false // 阻止表单的提交
            })

        })
    </script>
</body>
</html>